package com.piece.admin.api.dto;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.*;
import com.alibaba.excel.enums.BooleanEnum;
import com.alibaba.excel.enums.poi.BorderStyleEnum;
import com.piece.core.framework.annotation.office.ExcelCellConvert;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
@HeadFontStyle(bold = BooleanEnum.TRUE, fontHeightInPoints = 14)
@HeadStyle(borderBottom = BorderStyleEnum.MEDIUM)
@ContentFontStyle(fontHeightInPoints = 12)
@ContentStyle(wrapped = BooleanEnum.TRUE)
@ApiModel(value = "参数配置类")
public class SysConfigDTO {

    @ExcelProperty(index = 0, value = "名称")
    @ApiModelProperty(value = "参数名称")
    private String configName;

    @ExcelProperty(index = 1, value = "Key")
    @ApiModelProperty(value = "参数Key")
    private String configKey;

    @ColumnWidth(75)
    @ExcelProperty(index = 2, value = "值")
    @ApiModelProperty(value = "参数键值")
    private String configValue;

    @ExcelProperty(index = 3, value = "系统内置")
    @ExcelCellConvert(convertFormat = "Y=是,N=否", combo = {"是","否"})
    @ApiModelProperty(value = "系统内置", notes = "Y是 N否")
    private String configType;
}
